// This is the main DLL file.

#include "stdafx.h"

#include "Ubijacz.h"
#include "SettingsForm.h"

char* getText()
{
	Ubijacz::Wskaznik^wsk = gcnew Ubijacz::Wskaznik();		
	return wsk->getPointer("Ubijanie procesu (Ubijacz.dll)");
}

char* getSettings(char* _xml, bool* _zwroc)
{	
	*_zwroc = false;	

	System::String^ tekst = gcnew String(_xml);

	Ubijacz::SettingsForm forma;
	if (forma.ShowForm(tekst))
	{
		*_zwroc = true;			
		Ubijacz::Wskaznik^wsk = gcnew Ubijacz::Wskaznik();
		_xml = wsk->getPointer(tekst);		
	}	

	return _xml;
}

bool executeAction(char* _xml)
{	
	for each (System::Diagnostics::Process^ process in System::Diagnostics::Process::GetProcesses())
	{
		if (process->ProcessName == gcnew String(_xml))
		  process->Kill();			
	}

	return true;
}